﻿using System;
using System.Text;

namespace dotHTML.HTML {
    /// <summary>
    /// Represents a collection of filenames.
    /// </summary>
    [Serializable]
    [Obsolete("Deprecated in HTML4 - use <ul> instead.")]
    public class Dir : Element {
        private bool _compact;

        /// <summary>
        /// Determines whether or not this directory should be rendered in a
        /// compact style.
        /// </summary>
        [Obsolete("Deprecated in HTML4 - use CSS instead.")]
        public bool Compact {
            get { return _compact; }
            set { _compact = value; }
        }

        /// <summary>
        /// Gets a formatted string of all local attributes of this element
        /// (not including the base attributes).
        /// </summary>
        /// <param name="sb">The StringBuilder to write this element's
        /// attribute data to.</param>
        protected override void WriteLocalAttributes(StringBuilder sb) {
            AttributeWriter.Write(sb, _compact, "compact");
        }
    }
}
